export const isMobileDevice = ()=>{
    const mobileMediaQuery = '(max-width: 767px)';
    if (window.matchMedia(mobileMediaQuery).matches) {
        return true;
    } else {
        const userAgent = navigator.userAgent.toLowerCase();
        return /mobile|android|iphone|ipad|ipod|blackberry|iemobile|opera mini/i.test(userAgent);
    }
}